<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css" />
		<link rel="stylesheet" type="text/css" href="css/app.css" />

		<style type="text/css">
			.hmx-text-with-bottom {
				margin: 8px
			}
			
			img {
				width: 100%;
			}
		</style>
	</head>

	<body>

		<div class="mui-content">

			<img src="img/index_gallery.png" onclick="go2VipPay()" />

			<div>
				<span class="hmx-text-with-bottom">
					会员购买记录
				</span>
			</div>
			
			<div id="vipHistoryList">
				
			</div>

			<!--<div class="mui-card" style="margin-left: 0;margin-right: 0">
				****/**/**~****/**/**
			</div>
			<div class="mui-card" style="margin-left: 0;margin-right: 0">
				****/**/**~****/**/**
			</div>-->

		</div>

		<script src='js/jquery-2.1.4.min.js'></script>
		<script src="js/mui.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/common.js" type="text/javascript" charset="utf-8"></script>
		<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			$(function() {
				checkIsVip();
				initUI();
			});

			/**
			 * 20161029判断是否为会员且在有效期内
			 */
			function checkIsVip() {
				$.ajax({
					type: "get",
					url: $.getContextPath() + "/weixin/front_vip/deadline",
					async: true,
					success: function(r) {
						if(r.data.status == 1) {
							//显示会员有效期 
							$('#vipdate').html(r.data.deadline);
//							$('img').hide();
						} else {
							window.location.href = 'vipPay.html';
						}
					}
				});
			}

			function go2VipPay() {
				window.location.href = 'vipPay.html';
			}
			
			function initUI() {
				getHistory();
			}
			
			function getHistory() {
				$('#vipHistoryList').UIListView({
					//					dataUrl 'http://jwangkun.vicp.net/jywhweixin/weixin/front_index/latest',
					dataUrl: "data/front_vip/list2.json",
					itemTplUrl: "tpl/vipHistoryListItem.tpl"
				});
			}
		</script>
	</body>

</html>